{include file='pub/header'/}
<title>客户订单列表</title>
<style>
    body {
        background-color: #F7F7F7;
    }

    .dingbu {
        line-height: 45px;
        font-size: 18px;
        font-weight: bold;
        background-color: #ffffff;
    }
    .custom-nav div {
        line-height: 2rem;
        height: 2rem;
        font-size: .5rem;
    }

    .custom {
        background-color: #FFFFFF;
        border-radius: 10px;
        padding: .8rem;
    }

    .custom-name {
        line-height: 1.2rem;
        height: 1.2rem;
        margin: 5px 0 5px 0;
        font-size: .9rem;
    }
    .custom-name1 {
        line-height: 1.2rem;
        height: 1.2rem;
        margin: 5px 0 5px 0;
        font-size: .9rem;
        margin-left: 1.3rem;
    }

    .custom-name img {
        height: 1rem;
    }

    .custom-detail {
        line-height: 1.1rem;
        height: 1.1rem;
        color: #AEAEAE;
        margin-left: 1.3rem;
        font-size: .6rem;
        margin-bottom: 5px;
    }

    .custom-status {
        line-height: 1.6rem;
        height: 1.6rem;
        background-color: #2779f2;
        color: white;
        -moz-border-radius-topright: 10px;
        border-top-right-radius: 10px;
        border-bottom-left-radius: 50px;
        margin-top: -0.8rem;
        margin-right: -0.8rem;
        font-size: .6rem;
    }
    .custom-status1 {
        line-height: 1.6rem;
        height: 1.6rem;
        background-color: #cccccc;
        color: white;
        -moz-border-radius-topright: 10px;
        border-top-right-radius: 10px;
        border-bottom-left-radius: 50px;
        margin-top: -0.8rem;
        margin-right: -0.8rem;
        font-size: .6rem;
    }
</style>
</head>
<body>

<div class="dingbu col-12 text-c row cl">
    <div class="l" style="width: 40px;" onclick="history.back()">
        <i class="Hui-iconfont Hui-iconfont-arrow2-left"></i>
    </div>
    <div>
        客户订单列表
    </div>
</div>

<div class="custom_order">

</div>
<div class="text-c" id="more" onclick="getMore()">
    加载更多
</div>

{include file="pub/footer"/}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
    var page=0;
    $(function () {
        $(".custom_order").empty();
        getMore();
    });

    function getMore(){
        $.post("{:url('customOrder')}", {status: status, page: page}, function (res) {
            if(res.code == -1){
                layer.alert("参数错误");
                return;
            }
            var data = res.data;
            if(data.is_next==0){
                $("#more").html("已全部加载");
                $("#more").unbind('click');
            }else{
                page++;
            }
            var _html='';
            $.each(data.data, function (i,v) {
                _html += '<div class="mt-10 ml-20 mr-20 custom">\n';
                        if(v.is_comp ==1){
                            _html +='        <div class="r custom-status">\n' +
                            '            &nbsp;&nbsp;&nbsp;已结算&nbsp;&nbsp;\n' +
                            '        </div>\n';
                        }else if(v.is_comp == 0){
                            _html += '        <div class="r custom-status1">\n' +
                            '            &nbsp;&nbsp;&nbsp;未结算&nbsp;&nbsp;\n' +
                            '        </div>\n';
                        }else if(v.is_comp == 2){
                            _html += '        <div class="r custom-status1">\n' +
                                '            &nbsp;&nbsp;&nbsp;已撤销&nbsp;&nbsp;\n' +
                                '        </div>\n';
                        }
                    _html += '        <div class="custom-name">\n' +
                    '            <img src="__STATIC__/agent/list.png" alt=""> 订单编号 '+v.order_no+'        </div>\n' +
                    '        <div class="custom-name1">\n' +
                    '            <span>订单金额</span>\n' +
                    '            <span>'+v.total_money+'</span>\n' +
                    '        </div>\n' +
                    '        <div class="custom-detail">\n' +
                    '            <span>订单日期：'+v.create_time+'</span>\n' +
                    '            <span>返现金额：'+v.commission+'</span>\n' +
                    '        </div>\n' +
                    '    </div>';
            });
            $(".custom_order").append(_html);
        })
    }
</script>
</body>
</html>